package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		for key, value := range r.Header {
			fmt.Println(key, value)
		}
		defer r.Body.Close()
		data, err := ioutil.ReadAll(r.Body)
		if err != nil {
			w.WriteHeader(500)
			return
		}
		fmt.Println(string(data))
		w.WriteHeader(200)
	})
	http.ListenAndServe(":9088", nil)
}
